#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main() {
    srand(time(NULL));
    int target = rand() % 100 + 1;
    int guess;
    int attempts = 0;

    printf("欢迎来到猜数字游戏！\n");
    printf("我已经想好了一个 1 到 100 之间的数字，你来猜猜看。\n");

    do
    {
        printf("请输入你的猜测：");
        scanf("%d", &guess);
        attempts++;

        if (guess > target) {
            printf("你的猜测太高了！\n");
        } else if (guess < target) {
            printf("你的猜测太低了！\n");
        }
    }
    while ((guess!= target) && (attempts<10));
    
    if(attempts<=3)
    {
        printf("李光杰你太牛逼了！！！你猜了%d次就猜中了",attempts);
    }
    else if(attempts<=6)
    {
        printf("李光杰不错哟！继续加油哟！你猜了%d次猜中",attempts);
    }
    else if(attempts<=9)
    {
    printf("李光杰，你不行呀，还要继续练习哟！！！你猜了%d次才猜中呀！",attempts);
    }
    else
    {
        printf("不用玩了，猜了10次都没猜中，真无语!!!");
    }
    return 0;
}